package com.gouqi.mall.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

@ApiModel(value = "用户发布的求购/收购信息")
public class Message {
    @ApiModelProperty(value = "消息id")
    private Integer id;//消息
    @ApiModelProperty(value = "消息",required = true)
    private String message;//消息
    @ApiModelProperty(value = "详细描述")
    private String descInfo; //详描述细
    @ApiModelProperty(value = "用户")
    private String userId; //用户id
    @ApiModelProperty(value = "发布地址")
    private String address;//发布地址
    @ApiModelProperty(value = "联系电话")
    private String phone;//联系电话
    @ApiModelProperty(value = "信息类型")
    private Integer type;//信息类型
    @ApiModelProperty(value = "展示图片地址")
    private String imageDesc;//展示图片地址
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "展示图片地址")
    private String createTime;//创建时间

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getImageDesc() {
        return imageDesc;
    }

    public void setImageDesc(String imageDesc) {
        this.imageDesc = imageDesc;
    }

    public String getDescInfo() {
        return descInfo;
    }

    public void setDescInfo(String descInfo) {
        this.descInfo = descInfo;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Message{" +
                "id=" + id +
                ", message='" + message + '\'' +
                ", descInfo='" + descInfo + '\'' +
                ", userId='" + userId + '\'' +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                ", type=" + type +
                ", imageDesc='" + imageDesc + '\'' +
                ", createTime='" + createTime + '\'' +
                '}';
    }

}
